package com.usian.feign;

import com.usian.model.article.pojos.ApAuthor;
import com.usian.model.common.dtos.ResponseResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(value = "leadnews-article")
public interface ArticleFeign {

    @PostMapping("/api/v1/author/save")
    public ResponseResult saveAuthor(@RequestBody ApAuthor apAuthor);

    @GetMapping("/api/v1/author/findByUserId")
    public ApAuthor findByUserId(@RequestParam Integer userId);

    @GetMapping("/api/v1/author/findById/{id}")
    public ApAuthor findById(@PathVariable Integer id);
}
